'''
'''Override the CreateWhereClause to retrieve the record id.
'''
public Overrides Function CreateWhereClause() As WhereClause
Dim wc As WhereClause = New WhereClause()
' Get the XML-encoded record ID from the URL parameter.
' This will return something like: EmployeeID1
'
'
' EmployeeID
' 1
'
'
'cv means column value
'c means column name
'v means value
Dim recId As String = Me.Page.Request.QueryString.Item("${Table Name}")
If recId Is Nothing OrElse recId.Trim = "" Then
' Get the error message from the application resource file.
Throw New Exception(Page.GetResourceValue("Err:UrlParamMissing", "${Application Name}").Replace("{URL}", "${Table Name}"))
End If
Dim pkValue As KeyValue = KeyValue.XmlToKey(recId)
wc.iAND(${${Table Name}ClassName}.${Primary Key field}, BaseClasses.Data.BaseFilter.ComparisonOperator.EqualsTo, pkValue.GetColumnValue(${${Table Name}ClassName}.${Primary Key field}).ToString())
Return wc
End Function
|